<!-- 内容切换 -->
<template>
	<view>
		<text @click="text_click">
			<div v-if="visible" class="public_click_text">
			    {{dataSorce}}
			</div>
			<div v-else >
				{{dataSorce}}
			</div>
		</text>
	</view>
</template>

<script>
export default {
	props: {
		result:{
			default: ''
		}
	},
	data(){
		return {
			dataSorce: '',
			visible: true,
		}
	},
	
	mounted() {
		this.dataSorce = this.result;
	},
	methods:{
		text_click(val){
			this.visible = !this.visible;
		}
	}
}
</script>

<style scoped lang="scss">
	.public_click_text {
		overflow:hidden; 
		text-overflow:ellipsis;
		display:-webkit-box; 
		-webkit-box-orient:vertical;
		-webkit-line-clamp:1; 
	}
</style>
